<?php

use think\migration\Seeder;

class ControlPlanName extends Seeder
{
    /**
     * 管控 - 预案名称
     */
    public function run()
    {
        $table = $this->table('control_plan_name');
        $rows  = [
            [
                //step1:预案相关
                'plan_name'           => '长治市重污染减排预案1',
                'plan_type'           => 1,
                'plan_number'         => 'CZ2018-11-08 001号',

                //step2:管控相关
                'control_start_time'  => '2019-06-10 00:00',
                'control_end_time'    => '2019-06-12 23:59:59',
                'response_start_time' => '2019-06-13 18:00',
                'response_end_time'   => '2019-06-12 23:59:59',
                'bureau_plan_id'      => '0001',

                //step3:插入时间
                'create_time'         => time() - 3600 * 24,
            ],
        ];
        $table->insert($rows)->save();
    }
}